package com.unicom.auth.interceptor;

import com.jfinal.aop.Interceptor;
import com.jfinal.aop.Invocation;
import com.jfinal.token.TokenManager;

public class TokenInterceptor implements Interceptor {
	@Override
	public void intercept(Invocation inv) {
		boolean token = TokenManager.validateToken(inv.getController(),
				"plutoToken");
		if (token) {
			inv.invoke();
		} else {
			inv.getController().renderText("请不要重复提交"); 
		}
	}
}
